package com.lyy.entity.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/** @author JoeZhou */
@Schema(name = "用户下单参数实体")
@Data
public class OrderBuyParam implements Serializable {

    @Schema(description = "视频主键数组", required = true, example = "[1,2]")
    @NotNull(message = "视频主键数组不能为空")
    @Size(min = 1, message = "视频主键数组长度不能少于1")
    private Integer[] videoIds;

    @Schema(description = "订单总金额", required = true, example = "9999.99")
    @NotNull(message = "订单总金额不能为空")
    @DecimalMin(value = "0", message = "订单总金额不能小于0")
    private Double totalFee;

    @Schema(description = "订单描述")
    private String orderInfo;
}